// javamaps
// Copyright (c) 2010 Lup Gratian
package Rendering.Renderers;
import Rendering.*;
import Core.*;

public class RendererFactory {
    public static IRenderer Create(ILayer layer, IRendererHost host) {
        switch(layer.Type()) {
            case Image: {
                return new ImageRenderer(layer, host);
            }
            case Street: {
                return new StreetRenderer(layer, host);
            }
            case Marker: {
                return new MarkerRenderer(layer, host);
            }
            case Other: {
                // Se alege in functie de tipul clasei derivate din ILayer.
                return null;
            }
        }
        
        return null;
    }
}